% Based on the ECS Thesis style by Steve Gunn.
\documentclass[a4paper, 11pt, oneside, ifthen]{Thesis}
\usepackage[dutch,english]{babel}
\graphicspath{{figures/}}
\usepackage[round, sectionbib]{natbib}
%\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage{verbatim}
\usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" 
                    % style bold vectors in maths
\usepackage{charter}
\usepackage[charter]{mathdesign}
\usepackage{tabularx}
\usepackage{multicol}
%\usepackage[table]{xcolor} % For colored table cells with \cellcolor command
\setcounter{tocdepth}{2}

%\usepackage{makeidx}              % Necessary for making an index of terms.
%\makeindex                        % Necessary for making an index of terms.


%\usepackage{microtype}                      % UNCOMMENT TO TURN OFF LIGATURES!
%\DisableLigatures{encoding = *, family = *} % UNCOMMENT TO TURN OFF LIGATURES!


%\hypersetup{urlcolor=blue, colorlinks=true}
\hypersetup{
%  urlcolor=blue, 
  linkcolor=black,
  citecolor=black,
  filecolor=black,
  urlcolor=black,
  colorlinks=true,
  pdfauthor = {Toine Bogers},
  pdftitle = {Recommender Systems for Social Bookmarking},
  pdfsubject = {PhD thesis},
  pdfcreator = {LaTeX with hyperref package},
  pdfproducer = {pdflatex}
}
% Save a symbol that we know is going to get redefined.
\def\savesymbol#1{%
  \expandafter\let\expandafter\origsym\expandafter=\csname#1\endcsname
  \expandafter\let\csname orig#1\endcsname=\origsym
  \expandafter\let\csname#1\endcsname=\relax
}
% Restore a previously saved symbol, and rename the current one.
\def\restoresymbol#1#2{%
  \expandafter\let\expandafter\newsym\expandafter=\csname#2\endcsname
  \expandafter\global\expandafter\let\csname#1#2\endcsname=\newsym
  \expandafter\let\expandafter\origsym\expandafter=\csname orig#2\endcsname
  \expandafter\global\expandafter\let\csname#2\endcsname=\origsym
}
%%%\savesymbol{degree}           % Necessary for weird symbols, forgot which
%%%\usepackage{mathabx}          % Necessary for weird symbols, forgot which
\usepackage{color,calc,graphicx,soul}
\usepackage{fix-cm}
\usepackage{fncychap}                  % Fancy Chapters package
\usepackage{multirow,arydshln}         % Table packages

\definecolor{DarkGreen}{rgb}{0.0,0.5,0.0}
\definecolor{Maroon}{rgb}{0.5,0.0,0.0}
\definecolor{RoyalPurple}{rgb}{0.4,0.0,0.23}
\definecolor{Burgundy}{rgb}{.647,.129,.149}
\definecolor{FlickrBlue}{rgb}{0.25,0.60,0.93}
\definecolor{FlickrPink}{rgb}{1.00,0.00,0.52}
\newcommand{\todo}[1]{\textcolor{red}{#1}}
\newcommand{\story}[1]{\textcolor{DarkGreen}{#1}}
\newcommand{\antal}[1]{\colorbox{black}{\parbox{1.0\linewidth}{\textcolor{FlickrBlue}{\textsf{#1}}}}}
%\renewcommand{\tag}[1]{\textcolor{blue}{{\tt {\small #1}}}}
\renewcommand{\tag}[1]{\textcolor{Maroon}{\textsf{#1}}}
\newcommand{\tagg}[1]{\textcolor{Maroon}{\textsf{#1}}}
%\newcommand{\run}[1]{\textcolor{Maroon}{\textsf{{\sc #1}}}}
\newcommand{\run}[1]{\textcolor{Maroon}{\textsc{#1}}}
\newcommand{\system}[1]{\textsc{#1}}
\newcommand{\comb}[1]{\textsf{#1}}
\newcommand{\citey}{\citeyearpar}
\newcommand{\cul}{\textsf{CiteULike}}
\newcommand{\del}{\textsf{Delicious}}
\newcommand{\bib}{\textsf{BibSonomy}}
%\newcommand{\cul}{CiteULike}
%\newcommand{\del}{Delicious}
%\newcommand{\bib}{BibSonomy}
%\newcommand{\spamory}{\system{SpamoryTec}}
\newcommand{\spamory}{\system{Spamory}}
\newcommand{\tfidf}{tf$\cdot$idf}
\newcommand{\svmlight}{$\mathit{SVM}^{\mathit{light}}$}
\hyphenation{CiteULike}
\hyphenation{BibSonomy}
\hyphenation{ECML/PKDD}
\hyphenation{Levenshtein}
\newcommand{\citneed}{$^{\textrm{\todo{\textsf{CITATION NEEDED}}}}$}
\newcommand{\field}[1]{\textcolor{Maroon}{{\tt {\small #1}}}}
\newcommand{\fieldsmall}[1]{\textcolor{Maroon}{{\tt {\footnotesize #1}}}}
\newcommand{\shrink}{\vspace*{-.9\baselineskip}}
\newcommand{\shrinky}{\vspace*{-.6\baselineskip}}
\newcommand{\uptriangle}{$^{\vartriangle}$}
\newcommand{\downtriangle}{$^{\triangledown}$}
\newcommand{\upblack}{$^{\blacktriangle}$}
\newcommand{\downblack}{$^{\blacktriangledown}$}
\newcommand{\nosign}{\textcolor{white}{$^{\blacktriangledown}$}}
\newcommand{\dc}{\textsf{CiteULike}}
\newcommand{\dd}{\textsf{Delicious}}
\newcommand{\dba}{\textsf{BibArt}}
\newcommand{\dbb}{\textsf{BibBoo}}
\newcommand{\combsum}{\textsf{CombSUM}}
\newcommand{\combmnz}{\textsf{CombMNZ}}
\newcommand{\combanz}{\textsf{CombANZ}}
\newcommand{\combmax}{\textsf{CombMAX}}
\newcommand{\combmin}{\textsf{CombMIN}}
\newcommand{\combmed}{\textsf{CombMED}}





% Code for my fancy chapters.
\makeatletter 
  \ChNameVar{\normalfont\Large\scshape} % sets the style for name 
  \ChNumVar{\fontsize{85}{100}\selectfont\sffamily\color{white}}
  \ChTitleVar{\normalfont\Huge\bfseries\scshape\color{Burgundy}\raggedleft}
  \renewcommand{\DOCH}{% 
    \setlength{\fboxrule}{\RW}  
    \makebox[15.85cm][r]{
      \rotatebox{90}{
        \makebox[2.1cm]{ 
          \resizebox{3cm}{!}{ %\fboxsep=6pt
            \CNV\FmN{\space\@chapapp}
          }
        }
      }
      \resizebox{!}{2.5cm}{ \fboxsep=6pt
        \CNoV\colorbox{Burgundy}{\thechapter}
      }
    }\par\nobreak
    \vskip 0\p@} 
  \renewcommand{\DOTI}[1]{% 
    \CTV\FmTi{#1}\par\nobreak 
    \vskip 40\p@} 
  \renewcommand{\DOTIS}[1]{% 
    \CTV\FmTi{#1}\par\nobreak
    \vskip 40\p@} 
\makeatother 





% Definition of the fancy quote (fquote) class.
\definecolor{quotemark}{gray}{0.7}
\newenvironment{fquote}[1][]{%
  \begin{list}{}{%
      \setlength{\leftmargin}{0.1\textwidth}
      \setlength{\rightmargin}{0.1\textwidth}
    }
    \item[]%
    \begin{picture}(0,0)(0,0)
      \put(-15,-5){\makebox(0,0){%
	  \scalebox{5}{\textcolor{quotemark}{\bfseries``}}}%
      }
    \end{picture}\em\ignorespaces%
}{%
  \newline%
  \makebox[0pt][l]{\hspace{0.8\textwidth}
  \begin{picture}(0,0)(0,0)
    \put(15,10){\makebox(0,0){%
	\scalebox{5}{\textcolor{quotemark}{\rm\bfseries''}}}%
    }
  \end{picture}}%
  \end{list}
  \vspace{-2em}
}



%% ----------------------------------------------------------------
\begin{document}
\frontmatter	
\title{Recommender Systems for\\ Social Bookmarking}
\authors{\texorpdfstring
          {\href{http://ilk.uvt.nl/~toine}{Toine Bogers}}
          {Toine Bogers}
        }
\addresses  {\groupname\\\deptname\\\univname}
\date       {\today}
\subject    {}
\keywords   {recommender systems, social bookmarking, social tagging, collaborative filtering, content-based filtering, hybrid filtering, recommender fusion, data fusion, spam, duplicate detection, deduplication}

\maketitle





%% ----------------------------------------------------------------
\setstretch{1.3}  % It is better to have smaller font and larger line spacing than the other way round

% Define the page headers using the FancyHdr package and set up for one-sided printing
\fancyhead{}  % Clears all page headers and footers
\rhead{\thepage}  % Sets the right side header to show the page number
\lhead{}  % Clears the left side page header

\pagestyle{fancy}  % Finally, use the "fancy" page style to implement the FancyHdr headers





%% ---Cover page & colofon------------------------------------------
%\setstretch{1.3}
%\input{./frontmatter/cover-page}
%\newpage
%\newpage
%\makeemptypage
\input{./frontmatter/colofon}





%% ---The "Funny Quote Page"----------------------------------------
\pagestyle{empty}
\null\vfill
	\begin{fquote}
		The Web, they say, is leaving the era of search and entering one of 
		discovery. What's the difference? Search is what you do when you're 
		looking for something. Discovery is when something wonderful that you 
		didn't know existed, or didn't know how to ask for, finds you.
	\end{fquote}
\begin{flushright}
Jeffrey M. O'Brien
\end{flushright}

\vfill\vfill\vfill\vfill\vfill\vfill\null
\clearpage





%% ----------------------------------------------------------------
\pagestyle{fancy}  %The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back





%% ---The Acknowledgements page------------------------------------
\setstretch{1.1}
\makeemptypage
\lhead{\emph{Preface}} 
\input{./frontmatter/acknowledgments}






%% ----------------------------------------------------------------
%\makeemptypage
\lhead{\emph{Contents}}  % Set the left side page header to "Contents"
\tableofcontents  % Write out the Table of Contents





%% ---Dedication---------------------------------------------------
% End of the pre-able, contents and lists of things
%\setstretch{1.3}  % Return the line spacing back to 1.3
%\pagestyle{empty}
%\dedicatory{For Timmy and Oinky Bogersen}
%\addtocontents{toc}{\vspace{2em}}





%% ----------------------------------------------------------------
\mainmatter	       % Begin normal, numeric (1,2,3...) page numbering
\pagestyle{fancy}  % Return the page headers back to the "fancy" style

% Include the chapters of the thesis, as separate files
% Just uncomment the lines as you write the chapters


%\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
%\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
%\ifodd\c@page





\setstretch{1.1}
%\setlength{\parskip}{0pt}
%\setlength\parindent{0.25in}

\input{./chapters/01-introduction}      % Introduction
\makeemptypage %\makeemptypagenmbrs
\input{./chapters/02-related}           % Related Work

\makeemptypage
\input{./parts/part1-recommendation} % PART I
\makeemptypage
\input{./chapters/03-methodology}       %   Methodology
\makeemptypage %\makeemptypagenmbrs
\input{./chapters/04-folksonomic}       %   Folksonomic Recommendation
\makeemptypage %\makeemptypagenmbrs
\input{./chapters/05-context}           %   Metadata-based Recommendation
\input{./chapters/06-combining}         %   Combining Recommendations

\makeemptypage %\makeemptypagenmbrs
\input{./parts/part2-growing}        % PART II
\input{./chapters/08-spam}              %   Spam
\makeemptypage %\makeemptypagenmbrs
\input{./chapters/09-duplicates}        %   Duplicates

\makeemptypage %\makeemptypagenmbrs

\input{./parts/part3-conclusion}     % PART III
\makeemptypage %\makeemptypagenmbrs

\input{./chapters/10-discussion}        %   Conclusions
\makeemptypage





%% ---References-----------------------------------------------------
\btypeout{References}
\lhead{\emph{References}}
\label{References}
\renewcommand{\bibname}{}
\chapter*{References}
\addtotoc{References}
\setlength{\bibsep}{0.4\parsep}
\begin{small}
%\bibliographystyle{unsrtnat}
\bibliographystyle{plainnat}
%\bibliographystyle{abbrvnat}
\bibliography{bibliography}
\end{small}





%% ---Appendices-------------------------------------------------------
\phantomsection
\addtocontents{toc}{\vspace{0.5em}}
\addcontentsline{toc}{part}{Appendices}
\appendix

\makeemptypage
\input{./appendices/appendix-a}         % A -- Collecting the CiteULike ...
\input{./appendices/appendix-d}         
\input{./appendices/appendix-c}         % C -- Optimal Fusion Weights
\input{./appendices/appendix-b}


\backmatter





%% ---List of Figures---------------------------------------------------
\addtocontents{toc}{\vspace{2em}}
\lhead{\emph{List of Figures}}  
\listoffigures





%% ---List of Tables---------------------------------------------------
\lhead{\emph{List of Tables}}
\listoftables



 

%% ---Abbreviations-------------------------------------------------
%\setstretch{1.5}
\input{./backmatter/list-of-abbreviations}
\makeemptypage




%% ---Summary---------------------------------------------
\clearpage
\addtotoc{Summary}
\input{./backmatter/summary}
\makeemptypage




%% ---Samenvatting----------------------------------------
\clearpage
\addtotoc{Samenvatting}
\selectlanguage{dutch}
\input{./backmatter/samenvatting}
\selectlanguage{english}
\makeemptypage




%% ---Curriculum Vitae---------------------------------------------
\clearpage
\addtotoc{Curriculum Vitae}
\input{./backmatter/curriculum-vitae}
\makeemptypage




%% ---List of publications---------------------------------------------
\clearpage
\addtotoc{Publications}
\input{./backmatter/list-of-publications}





%% ---SIKS Dissertation Series---------------------------------------
\clearpage
\addtotoc{SIKS Dissertation Series}
\input{./backmatter/siks-dissertation-series}





%% ---TiCC Dissertation Series---------------------------------------
\clearpage
\addtotoc{TiCC Dissertation Series}
\input{./backmatter/ticc-dissertation-series}





% ---Index of Terms---------------------------------------------------
%\clearpage
%\addtotoc{Index}
%\printindex





\end{document}

